<link rel="stylesheet" href="/Public/css/common/jquery-ui.css">
<link rel="stylesheet" type="text/css" href="/Public/css/common/base.css">
<link rel="stylesheet" type="text/css" href="/Public/css/common/animate.css">
<link rel="stylesheet/less" type="text/css" href="/Public/css/common/wangEditor.less">
<!-- <link rel="stylesheet" href="/Public/css/common/material.css"> -->
<link rel="stylesheet/less" type="text/css" href="/Public/css/editor/content.less">
<link rel="stylesheet/less" type="text/css" href="/Public/css/editor/editor.less">

<style>
    .row{margin-left: 0px;margin-right: 0px}
    body{font-size: 14px}
    .modal-content{width:450px;margin:auto}
</style>
<div id="page-wrapper">
    <div class="row">
        <div class="col-lg-12">
            <h3 class="page-header">
                <present name="editor">编辑<else/>添加</present>页面
            </h3>
        </div>
    </div>
    <div class="row">
        <div class="col-lg-12">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <ul class="nav nav-tabs" id="myTab">
                        <li class="active"><a href="#basic">页面设置</a></li>
                        <li><a href="#push">推送设置</a></li>
                        <li><a href="#share">分享设置</a></li>
                    </ul>
                </div>
                <div class="panel-body">
                    <div class="form-horizontal">
                        <present name="editor.id">
                            <input type="hidden" name="id" value="{$editor['id']}">
                            <else />
                            <input type="hidden" name="id" value="-1">
                        </present>
                        <input type="hidden" name="version" value="{$version}">
                        <div class="tab-content">
                            <div class="tab-pane active" id="basic">
                                <include file="new_basic" />
                            </div>
                            <div class="tab-pane" id="push">
                                <include file="push" />
                            </div>
                            <div class="tab-pane" id="share">
                                <include file="share" />
                            </div>
                        </div>
                        <!--<button type="button" id="sub_button" class="btn btn-primary">提交</button>-->
                        <!--<button type="button" class="btn btn-default" onclick="history.go(-1)">返回列表</button>-->
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!--<script src="Public/js/common/jquery-3.1.1.js"></script>-->
<script src="/Public/js/common/jquery-ui.js"></script>
<!-- <script src="/Public/js/common/material.js"></script> -->
<!--<script src="//cdnjs.cloudflare.com/ajax/libs/less.js/2.5.3/less.min.js"></script>-->
<script src="/Public/js/common/less.js"></script>
<script src="/Public/js/common/wangEditor.js"></script>
<!--<script src="libs/swiper.jquery.js"></script>-->
<!--common of all js file-->

<script src="/Public/js/editor/common.js"></script>
<!--add self scrip file-->
<script src="/Public/js/editor/new_editor.js?v2"></script>
<script type="text/javascript">
    $(function () {
        $('#myTab a:first').tab('show');//初始化显示哪个tab

        $('#myTab a').click(function (e) {
            e.preventDefault();//阻止a链接的跳转行为
            $(this).tab('show');//显示当前选中的链接及关联的content
        })
    })

    //推送和分享图标
    $('#push_image').on('change',function(e){
        ns.utils.uploadImg(e, function(r){
            $("#push_image").next().attr("src", r.msg)
        })
    })
    $('#share_image').on('change',function(e){
        ns.utils.uploadImg(e, function(r){
            $("#share_image").next().attr("src", r.msg)
        })
    })
</script>